<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ include file="header.jsp" %>
<%@ page import="java.util.*" %>
<%@ page import="au.edu.unsw.editingtool.global.GlobalConstant" %>
<%
ArrayList<String> cc = new ArrayList<String>();
cc = (ArrayList<String>) request.getAttribute(GlobalConstant.paramClaimClaimed);
ArrayList<String> cr = new ArrayList<String>();
cr = (ArrayList<String>) request.getAttribute(GlobalConstant.paramClaimRequest);
%>

<H1>Main Page</H1>
<H2>Username: <%=session.getAttribute(GlobalConstant.username) %></H2>
<H2>Possible menu</H2>
<DIV id="leftmenu">
<a href="resources.jsp">My Resources (not a working link)</a><BR>
<a href="search.jsp">Search Resource (not a working link)</a><BR>
<a href="edit.jsp">Edit Metadata (not a working link)</a><BR>
<a href="upload.jsp">Upload Attachment (not a working link)</a><BR>
<a href="log.jsp">View Log (not a working link)</a><BR>
<%
if(session.getAttribute(GlobalConstant.userGroup)!=null)
{
	if(((String) session.getAttribute(GlobalConstant.userGroup)).compareTo(GlobalConstant.groupUser)!=0)
	{
%>
<a href="review.jsp">Review Resource (not a working link)</a><BR>
<a href="/EditingTool/ClaimReview?ctrl=<%=GlobalConstant.cmdClaimReview %>">Review Claim</a><BR>
<%				
	}
	if((((String) session.getAttribute(GlobalConstant.userGroup)).compareTo(GlobalConstant.groupAdmin)==0) ||
		(((String) session.getAttribute(GlobalConstant.userGroup)).compareTo(GlobalConstant.groupSysAdmin)==0))
	{
%>
<a href="admin.jsp">Administration (not a working link)</a><BR>

<%
	}
}
%>
<a href="LogoutManager">Logout</a><BR>

</DIV>
<br>
<br>
<p>
Please input the repository id for editing
</p>
<form method="post" action="/EditingTool/Edit" class="review">
<input type="text" name=<%=GlobalConstant.pid%> class="title" id="title" size=95 onChange="" /><br>
<input type="submit" value="Start Edit">
<input type="hidden" name="<%=GlobalConstant.requestCommand%>" value="<%=GlobalConstant.cmdEdit %>">
</form>
<br>
<br>
<br>
<br>
<br>
<br>
<%
if(cc!=null)
{
	if(cc.size()!=0)
	{
%>

<h2>
My claimed
</h2>
<%
		for(int i = 0;i<cc.size();i++)
		{

%>
<a href="Edit?pid=<%=cc.get(i) %>&ctrl=edit"><%=cc.get(i) %></a><BR>
<%
		}
	}
}
%>

<%
if(cr!=null)
{
	if(cr.size()!=0)
	{
%>
<h2>
My claimed
</h2>
<%		
		for(int i = 0;i<cr.size();i++)
		{
%>
<a href="Edit?pid=<%=cr.get(i) %>&ctrl=edit"><%=cr.get(i) %></a><BR>
<%
		}
	}
}
%>

<br>
<br>
<h2>Just a test link</h2>
<a href="limited/EditMetaData?pid=dark:486&ctrl=edit">Roger Edit Metadata pid dark:486</a><BR>
<a href="Edit?pid=dark:486&ctrl=edit">Edit Metadata pid dark:486</a><BR>
<a href="Edit?ctrl=edit">Error 1 Edit Metadata no pid</a><BR>
<a href="Edit?pid=dark:486">Error 1 Edit Metadata no ctrl</a><BR>
<br>
<br>
<%@ include file="footer.jsp" %>